<?php
/**
 * Created by PhpStorm
 * User: whh
 * Date: 2022/7/28
 * Time: 16:02
 */

namespace app\common\model;


use think\Model;

class SignConfig extends Model
{
    protected $table = 'quick_sign_config';

    /**
     * 签到基础模板
     * @param $maxDay
     * @return \int[][]
     * @Author: whh
     */
    public static function defaultTemplate($maxDay)
    {
        if ($maxDay == 7) {
            return [
                1 => ['point' => 20],
                2 => ['point' => 20],
                3 => ['point' => 30],
                4 => ['point' => 30],
                5 => ['point' => 40],
                6 => ['point' => 40],
                7 => ['point' => 60],
            ];
        } else {
            $data = [];
            for ($i = 1; $i <= $maxDay; $i++) {
                $data[$i] = ['point' => 30];
            }
            return $data;
        }
    }
}